<template>
	<view class="classLayout">
		<custom-nav-bar title="分类"></custom-nav-bar>
		<view class="classify">
			<theme-item v-for="item in classifyList" :item="item" :key="item._id"></theme-item>
		</view>
	</view>
</template>

<script setup>
import { ref } from 'vue';
import {onShareAppMessage,onShareTimeline} from '@dcloudio/uni-app'
import {apiGetBanner,apiGetDayRandom,apiGetNotice,apiGetClassify} from '@/api/apis.js'	

const classifyList = ref([]);

const getClassify =async()=>{
	let res =await apiGetClassify({
		pageSize:100
	});
	classifyList.value = res.data
	console.log(res);
}

//分享给好朋友
onShareAppMessage ((e)=>{
	return {
		title:"小红车壁纸",
		path:"/page/classify/classify"
	}
})

//分享朋友圈
onShareTimeline(()=>{
	return {
		title:"小红车壁纸",
		imageUrl:"/static/images/0643.jpg"
	}
})

getClassify();
</script>

<style lang="scss" scoped>
.classify{
	padding: 30rpx;
	display: grid;
	grid-template-columns: repeat(3,1fr);
	gap: 15rpx;
}
</style>
